package com.ruoqing.core.dto.user;

import com.ruoqing.core.domain.rquser.UserEntity;
import com.ruoqing.core.dto.BaseResponse;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;

/**
	* @author YaoXian
	* @title: UserResponse
	* @projectName ruoxi-blog
	* @description: 若兮微服务 - 核心模块 - 用户dto数据传输对象
	* @date 2020-11-19 22:08
	*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public class UserResponse extends BaseResponse {
		
		@XmlElement
		private UserEntity userEntity;
		
		@XmlElement
		private List<UserEntity> userEntityList;
		
		public UserEntity getUserEntity() {
				return userEntity;
		}
		
		public void setUserEntity(UserEntity userEntity) {
				this.userEntity = userEntity;
		}
		
		public List<UserEntity> getUserEntityList() {
				return userEntityList;
		}
		
		public void setUserEntityList(List<UserEntity> userEntityList) {
				this.userEntityList = userEntityList;
		}
		
		public static UserResponse buildUserResponse(String status,String message,UserEntity userEntity,List<UserEntity> list){
				UserResponse userResponse = new UserResponse();
				userResponse.setStatus(status);
				userResponse.setMessage(message);
				userResponse.setUserEntity(userEntity);
				userResponse.setUserEntityList(list);
				return userResponse;
		}
		
		public static UserResponse buildUserResponse(String status,UserEntity userEntity,List<UserEntity> list){
				UserResponse userResponse = new UserResponse();
				userResponse.setStatus(status);
				userResponse.setUserEntity(userEntity);
				userResponse.setUserEntityList(list);
				return userResponse;
		}
		
		public static UserResponse buildUserResponse(String status,String message){
				UserResponse userResponse = new UserResponse();
				userResponse.setStatus(status);
				userResponse.setMessage(message);
				return userResponse;
		}
		
		public static UserResponse buildUserResponse(String status,String message,UserEntity userEntity){
				UserResponse userResponse = new UserResponse();
				userResponse.setStatus(status);
				userResponse.setMessage(message);
				userResponse.setUserEntity(userEntity);
				return userResponse;
		}
		
		public static UserResponse buildUserResponse(String status,String message,List<UserEntity> list){
				UserResponse userResponse = new UserResponse();
				userResponse.setStatus(status);
				userResponse.setMessage(message);
				userResponse.setUserEntityList(list);
				return userResponse;
		}
		
		public static UserResponse buildUserResponse(String status,UserEntity userEntity){
				UserResponse userResponse = new UserResponse();
				userResponse.setStatus(status);
				userResponse.setUserEntity(userEntity);
				return userResponse;
		}
		
		public static UserResponse buildUserResponse(String status,List<UserEntity> list){
				UserResponse userResponse = new UserResponse();
				userResponse.setStatus(status);
				userResponse.setUserEntityList(list);
				return userResponse;
		}
}
